package string;
//trim():去除当前字符串两边的空白字符
public class TrimDemo {
    public static void main(String[] args) {
        String str="     hello  world     ";
        str=str.trim();
        System.out.println(str);


        String str1="     asdfghh    ";
        str1=str1.trim();
        System.out.println(str1);
    }
}
